package cn.seaboot.admin.api.bean;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.Size;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * POJO
 * 接口映射配置 [t_api_mapping]
 *
 * @author Mr.css on 2018-6-20
 */
@Schema(description = "接口映射配置 [t_api_mapping] 实体类")
public class ApiMapping implements Serializable {

    private static final long serialVersionUID = 4341056466607372574L;
    /**
     * ID
     */
    @Schema(description = "ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    /**
     * 工程ID
     */
    @Size( max = 32)
    @Schema(description = "工程ID")
    private String projectId;
    /**
     * 全类名
     */
    @Size( max = 64)
    @Schema(description = "全类名")
    private String controllerClass;
    /**
     * 函数名
     */
    @Size( max = 64)
    @Schema(description = "函数名")
    private String methodName;
    /**
     * 地址
     */
    @Size( max = 255)
    @Schema(description = "地址")
    private String requestMapping;
    /**
     * 请求方式
     */
    @Size( max = 8)
    @Schema(description = "请求方式")
    private String requestMethod;
    /**
     * 描述
     */
    @Size( max = 128)
    @Schema(description = "描述")
    private String description;
    /**
     * 类型
     */
    @Size( max = 32)
    @Schema(description = "类型")
    private String formType;
    /**
     * 数据响应模型
     */
    @Size( max = 255)
    @Schema(description = "数据响应模型")
    private String responseClass;
    /**
     * 响应对象类型
     */
    @Schema(description = "响应对象泛型")
    private String responseGeneric;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getControllerClass() {
        return controllerClass;
    }

    public void setControllerClass(String controllerClass) {
        this.controllerClass = controllerClass;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getRequestMapping() {
        return requestMapping;
    }

    public void setRequestMapping(String requestMapping) {
        this.requestMapping = requestMapping;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getFormType() {
        return formType;
    }

    public void setFormType(String formType) {
        this.formType = formType;
    }

    public String getResponseClass() {
        return responseClass;
    }

    public void setResponseClass(String responseClass) {
        this.responseClass = responseClass;
    }

    public String getResponseGeneric() {
        return responseGeneric;
    }

    public void setResponseGeneric(String responseGeneric) {
        this.responseGeneric = responseGeneric;
    }

    @Override
    public String toString() {
        return "ApiMapping{" +
                "id='" + id + '\'' +
                ", projectId='" + projectId + '\'' +
                ", controllerClass='" + controllerClass + '\'' +
                ", methodName='" + methodName + '\'' +
                ", requestMapping='" + requestMapping + '\'' +
                ", requestMethod='" + requestMethod + '\'' +
                ", description='" + description + '\'' +
                ", formType='" + formType + '\'' +
                ", responseClass='" + responseClass + '\'' +
                ", responseGeneric='" + responseGeneric + '\'' +
                '}';
    }
}
